package cn.sdormitory.report.service.impl;

import cn.sdormitory.report.dao.ClassAttenceStaDao;
import cn.sdormitory.report.service.ClassAttenceStaService;
import cn.sdormitory.report.vo.ClassAttenceStaVO;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @创建人：zhouyang
 * @创建时间：2022/1/17 16:07
 * @version：V1.0
 */
@Slf4j
@Service("classAttenceStaService")
public class ClassAttenceStaServiceImpl extends ServiceImpl<ClassAttenceStaDao, ClassAttenceStaVO> implements ClassAttenceStaService {
    @Resource
    ClassAttenceStaDao classAttenceStaDao;

    @Override
    public List<ClassAttenceStaVO> getClassAttenceStaList(String accDate, String timeSlot, String classDeptId, int pageNum, int pageSize) {
        int currIndex=(pageNum-1)*pageSize;
        return classAttenceStaDao.getClassAttenceStaList(accDate,timeSlot,classDeptId,currIndex,pageSize);
    }

    @Override
    public Long getTotalCountByDate(String accDate, String timeSlot, String classDeptId) {
        Long result=classAttenceStaDao.getTotalCountByDate(accDate,timeSlot,classDeptId);
        return result;
    }

    @Override
    public List<ClassAttenceStaVO> getClassAttenceStaListExport(String accDate, String timeSlot, String classDeptId) {
        return classAttenceStaDao.getClassAttenceStaListExport(accDate,timeSlot,classDeptId);
    }
}
